#include <Windows.h>
#include "Game.h"
#include "Logger.h"

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

#include <vld.h>

#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3dx11.lib")
#pragma comment(lib, "d3dx10.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "sqlite3.lib")

using namespace std;


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int cmdShow) {
	
	/*
	// Put this at the top of your winmain function
	_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
	_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );
 
	_CrtSetBreakAlloc(-1); // Important line
	*/

	Logger::Initialize(LOG_NOTICES);

	Logger::Log("Starting game...", __FILE__, __LINE__);
	Game::Start(hInstance);

	Logger::Shutdown();

	return 0;

}